import React from "react";
import "../pages/Home.css";
import {
  HashRouter, //路由模式  嵌套路由
  Switch,
  Route,
} from "react-router-dom";

import shouye from "../pages/shoye";

class Home extends React.Component {
  constructor(props) {
    super(props);
  }

  render() {
    return (
      <HashRouter>
        <div>
          <ul className="top">
            <li
              onClick={() => {
                this.props.history.push("/shouye");
              }}
            >
              小米商城
            </li>
            <li>MIUI</li>
            <li>loT</li>
            <li>云服务</li>
            <li>天星科技</li>
            <li>有品</li>
            <li>小艾开放平台</li>
            <li>企业团购</li>
            <li>资质证照</li>
            <li>协议规则</li>
            <li>下载app</li>
            <li>智能生活</li>
            <li>企业团购</li>
          </ul>

          <ul className="bottom">
            <li
              onClick={() => {
                this.props.history.push("/shouye");
              }}
            >
              小米商城
            </li>
            <li>loT</li>
            <li>公司信息</li>
            <li>新品上市</li>
            <li>小米商城</li>
            <li>小米商城</li>
            <li>小米商城</li>
            <li>小米商城</li>
            <li>小米商城</li>
          </ul>
          
          <div>
            <Switch>
              <Route path="/shouye" component={shouye} />
            </Switch>
          </div>
        </div>
      </HashRouter>
    );
  }
}

export default Home;
